package yao.xerophyte.java.reflect;

import java.io.Serializable;
import java.util.List;

/**
 * 用于反射学习的示例类
 *
 * @author yaojianxing
 */
@ClassName("Car")
public class Car<T> extends Things implements Serializable {
    private static final long serialVersionUID = 395838261002905327L;
    private Integer maxSpeed = 100;
    private List<String> wheels;
    private T passenger;
    
    public Car() {
        super.setName("奥拓");
    }
    private Car(String name) {
        super.setName(name);
    }
    public Car(String name, List<String> wheels) {
        super.setName(name);
        this.wheels = wheels;
    }
    
    private String loadNameSpeed() {
        return "我叫" + super.getName() + "我能跑" + maxSpeed + "km/h";
    }
    
    public T getPassenger() {
        return passenger;
    }
    
    public void setPassenger(T passenger) {
        this.passenger = passenger;
    }
    
    public List<String> getWheels() {
        return wheels;
    }
    
    public void setWheels(List<String> wheels) {
        this.wheels = wheels;
    }
    
    
    public Integer getMaxSpeed() {
        return maxSpeed;
    }
    
    public void setMaxSpeed(Integer maxSpeed) {
        this.maxSpeed = maxSpeed;
    }
    
    @Override
    public String toString() {
        return "我是"+getName();
    }
}
